<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>使用函数对象的原型对象，创建一个新的对象</title>
</head>
<body>
        <script>
            var a = {
                username:'frank'
            };
            var c = Object.create(a);
            function myCreate(a){
                var to;
                function F(){}
                F.prototype = a;
                to = new F();  //自身对象的属性是空的，加上原型对象，原型对象=== a
                return to;
            }
            var b = myCreate(a);
            console.log(b)

            var d = a;
        </script>
</body>
</html>